<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title><?php echo $title_for_layout ?></title>
<link rel="stylesheet" type="text/css" href="/css/main.css" media="screen"/>
<script type="text/javascript" src="/js/jquery-1.2.6.min.js"></script>
<script type="text/javascript" src="/js/jquery.phpdate.js"></script>
<script type="text/javascript" src="/js/order.js"></script>

<?php echo $scripts_for_layout ?>

</head>

<body>
<div id="layout">
  <?php
  date_default_timezone_set('Asia/Shanghai');
  $now = date('Y-m-d');
  $weekday = date('w', strtotime($now));
  switch($weekday)
{
    case 0:
        $weekday = '天';
        break;
    case 1:
        $weekday = '一';
        break;
    case 2:
        $weekday = '二';
        break;
    case 3:
        $weekday = '三';
        break;
    case 4:
        $weekday = '四';
        break;
    case 5:
        $weekday = '五';
        break;
    case 6:
        $weekday = '六';
        break;
}
  ?>
  <div id="top">今天是<?php echo date('Y年m月d日', strtotime($now)) ?>&nbsp;星期<?php echo $weekday ?>&nbsp;&nbsp;天气: <?php echo $this->element('weather') ?></div>
  <div><a href="/"><img src="/img/logo.png" border="0" /></a></div>
  <div id="nav"><a href="/">首页</a><img src="/img/jg.png"/><?php if($isLogin): ?><a href="/admin/logout">退出</a><?php else:?><a href="/admin">登录</a><?php endif ?><img src="/img/jg.png"/><a href="#" onclick="viewMyOrders(2); return false;" >查看今日订餐</a><!--<img src="/img/jg.png"/><a href="#" onclick="viewMyOrders(0); return false;">查看我的历史</a>--><img src="/img/jg.png"/><a href="#" onclick="viewMyOrders(1); return false;" >查看所有人历史</a></div>

  <div id="order">
    <?php echo $content_for_layout; ?>
    <img id="egg" src="/img/egg.png"/>
  </div>
</div>
</body>
</html>
